<#import "/ftl/mainAdmin.ftl" as page>

<@page.mainTemplate styleSheet="moduleDownloadCss" jsFile="moduleDownloadJs" current="模板下载">
	<!-- BEGIN CONTENT BODY -->
    <div class="page-content">
    	<!-- BEGIN PAGE HEAD-->
         <div class="page-head">
            <!-- BEGIN PAGE TITLE -->
            <div class="page-title">
                <h1><#if mSysFileTemplateVO.id??>编辑模板<#else>新建模板</#if>
                    <small><#if mSysFileTemplateVO.id??>编辑模板信息页面<#else>新建模板信息页面</#if></small>
                </h1>
            </div>
            <!-- END PAGE TITLE -->
        </div>
        <!-- END PAGE HEAD-->
        <!-- BEGIN PAGE BREADCRUMB -->
        <ul class="page-breadcrumb breadcrumb">
        	<li>
                <a href="${context}/base/index_ftl">首页</a>
                <i class="fa fa-circle"></i>
            </li>
            <li>
                <span class="active"><#if mSysFileTemplateVO.id??>编辑模板信息<#else>新建模板信息</#if></span>
            </li>
        </ul>
        <!-- END PAGE BREADCRUMB -->
        <!-- BEGIN PAGE BASE CONTENT -->
        <div class="row">
            <div class="portlet light bordered">
                <div class="portlet-title">
                    <div class="caption">
                        基本信息</div>
                </div>
                <div class="portlet-body form edit-form">
                    <form action="#" class="horizontal-form createform" id="addModuleForm" >
                            <input type="hidden" id="id"  name="id" value="${mSysFileTemplateVO.id}">
                            <input type="hidden" id="path"  name="path" value="${mSysFileTemplateVO.accessory_address}"> 
                            <div class="form-body">
	                            <div class="alert alert-danger display-hide">
	                                <button class="close" data-close="alert"></button> 表单含有错误. 请检查. 
	                            </div>
	                            <div class="alert alert-success display-hide">
	                                <button class="close" data-close="alert"></button> 表单验证通过! 
	                            </div>
                                <div class="row">
                                	<div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">模板名称</label>
                                            	<div class="input-group-content">
                                                	<input placeholder="★模板名称" class="form-control" name="template_name" value="${mSysFileTemplateVO.template_name}">
				                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-6">
                                        <div class="form-group">
                                            <div class="input-group">
                                                <label class="input-group-addon">排序</label>
                                                <div class="input-group-content">
                                                	<input type="text" class="form-control" placeholder="★排序编号" name="sort_no" value="${mSysFileTemplateVO.sort_no}">
                                            	</div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                    
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <div class="input-group intro-content">
                                                <label class="input-group-addon">模板说明</label>
                                            	<div class="input-group-content">
                                                	<textarea class="form-control" name="template_explain" placeholder="★模板说明">${mSysFileTemplateVO.template_explain}</textarea>
				                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-md-4">
                                        <div class="form-group">
                                            <div class="input-group">
                                        		<span class="btn btn-success fileinput-button">
                                                    <i class="glyphicon glyphicon-plus"></i>
                                                    <span><#if mSysFileTemplateVO.accessory_address??>重新上传文件<#else>选择上传文件</#if></span>
                                                    <input id="fileupload" type="file" name="files" >
                                                </span>
                                                <div>${mSysFileTemplateVO.accessory_address}</div>
                                                <div id="files" class="files"></div>
			                                	<div id="progress" class="progress hide">
                                                    <div class="progress-bar progress-bar-success"></div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!--/span-->
                                </div>
                            </div>
                            <div class="form-actions top">
                                <div class="row">
                                    <div class="col-md-offset-5 col-md-7">
                                       <#if view !='toView'>
                                         <button type="submit" class="btn green" id="infoSave">保存</button>
                                        </#if>
                                        <a href="${context}/systemplate/template_view" class="btn default">返回</a>
                                    </div>
                                </div>
                            </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <!-- END CONTENT BODY -->

</@page.mainTemplate>